<template>
  <div>
    <h2>我是subRole1(递归组件)</h2>
    <DgComponent :listData="listData" />
  </div>
</template>

<script>
import DgComponent from "@/components/DgComponent.vue";
export default {
  components: { DgComponent },
  data() {
    return {
      listData: [
        {
          name: "1-1",
          children: [
            {
              name: "2-1",
              children: [
                {
                  name: "3-1",
                  children: [
                    {
                      name: "4-1",
                    },
                  ],
                },
              ],
            },
          ],
        },
        {
          name: "1-1",
          children: [
            {
              name: "2-1",
              children: [
                {
                  name: "3-1",
                  children: [
                    {
                      name: "4-1",
                    },
                  ],
                },
              ],
            },
          ],
        },
      ],
    };
  },
};
</script>

<style>
</style>